package com.zhao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhao.pojo.Article;
import com.zhao.pojo.Comment;
import com.zhao.pojo.Statistic;
import com.zhao.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;

@Repository
@Mapper
public interface UserMapper extends BaseMapper<User> {

    List<String> checked(Integer id);

    void saveRoles(String[] rids);

    void delUserRole(Integer id);

    void updateRoles(@Param("id")Integer userId, @Param("rids")String[] rids);

    List<String> getByIdPerms(Integer uid);

    void registerUserRole(@Param("uid")Integer userId,@Param("rid") int roleid);

    List<Comment> ListNewcomment(String userAccount);

    List<Article> ListhotsArticle(@Param("i") int i,@Param("account") String account);

    Statistic SumStatistic(@Param("account")String userAccount);
}
